import Vue from 'vue'
import Router from 'vue-router'
import Product from '@/components/product/Product'

// 导入商品页
import Commodity from '@/components/product/components/Commodity'
import Comment from '@/components/product/components/Comment'
import Merchant from '@/components/product/components/Merchant'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Product',
      component: Product,
      children: [
        {path: 'commodity', name: 'Commodity', component: Commodity},
        {path: 'comment', name: 'Comment', component: Comment},
        {path: 'merchant', name: 'Merchant', component: Merchant}
      ],
      redirect: 'commodity'
    }
  ],
  linkActiveClass: 'myactive'
})
